﻿namespace SuperMarieApi.App.Controllers.Framework.Common
{
    using System;

    public static class NumberExtensions
    {
        public static bool InRange<T>(this IComparable<T> t, T minT, T maxT)
        {
            return ((t.CompareTo(minT) >= 0) && (t.CompareTo(maxT) <= 0));
        }

        public static double ToDouble(this decimal value)
        {
            return Convert.ToDouble(value);
        }
    }


}
